home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / comm / tcp / amircpin.lha / ping.amirx < prev   
Text File  |  1997-02-02  |  2KB  |  68 lines

  1. /* Ping script for use with AmIRC 1.x */ Version='1.01' /*
  2. // Written by Deryk Robosson 3.1.96
  3. //
  4. // newlook@ameritech.net newlook on #amiga IRC (EfNet)
  5. //
  6. // 2.2.97 Added flood support to script
  7. //        as well as just passing it a user nick.
  8. */
  9. /* set your ping count here */
  10. count=5
  11.  
  12. bold=d2c(2)
  13.  
  14. options results
  15. parse arg param
  16.  
  17. param=trim(upper(param))
  18. if param="" then do
  19.     Call Version()
  20.     Exit
  21. end
  22. if param='VER' then do
  23.     Call Version()
  24.     Exit
  25. end
  26. if param='HELP' then do
  27.     Call Help()
  28.     Exit
  29. end
  30.  
  31. if param~="" then do
  32.     parse var param site" "command
  33.     if site~="" then site=trim(upper(site))
  34.     else site=""
  35.     if command~="" then command=trim(upper(command))
  36.     else command=""
  37. end
  38.  
  39. 'USERHOST 'site
  40. if result~="RESULT" then parse var result user"@"site
  41.  
  42. /* prepare for the main file */
  43. con="con:0/0/600/100/PingOutput/CLOSE/SIMPLEREFRESH"
  44.  
  45. /* switch on our parameters */
  46. select
  47.     when command="" then ping='amitcp:bin/ping -c'||count||' '||site||' >'||con
  48.     when command="FLOOD" then ping='amitcp:bin/ping -f '||site||' >'||con
  49.     otherwise nop
  50. end
  51.  
  52. ADDRESS COMMAND ping
  53. EXIT
  54.  
  55. Version:
  56. 'echo 'BOLD"Ping.AMIRX"BOLD" Version "BOLD||VERSION||BOLD
  57. 'echo '"Read the top of Ping.AMIRX script for history."
  58. 'echo 'BOLD"©1996,97"BOLD" Deryk Robososn "BOLD"(newlook)"BOLD" - [newlook@ameritech.net]"
  59. 'echo 'BOLD"USAGE:"BOLD" /<alias> usernick, /<alias> site.com, /<alias> usernick FLOOD"
  60. return
  61.  
  62. Help:
  63. 'echo 'BOLD"Ping.AMIRX"BOLD" Help"
  64. 'echo 'BOLD"VER - "BOLD"displays script version"
  65. 'echo 'BOLD"FLOOD - "BOLD"selects ping flood"
  66. 'echo 'BOLD"HELP - "BOLD"displays this file"
  67. return
  68.